#include "processBar.h"
#define RED "\033[0;32;31m"
#define NONE "\033[m"

const char* lable = "|/-\\";

void processbar()
{
    char bar [NUM];
    memset(bar,'\0',sizeof(bar));
    int i = 0;
    int len = strlen(lable);

    while(i<=100)
    {
        printf(RED"[%-100s]"NONE"[%d%%]""[%c]""\r",bar,i,lable[i % len]);
        bar[i++] = STYLE;
        if(i<100)
            bar[i] = '>';
        fflush(stdout);
        usleep(100000);
    }

    printf("\n");
}


